$(function(){
	
	init();
})



function init(){
	$(".delete_button").click(function(){
		 var album_id=$(this).parent().attr("id");
		 var img_path=$(this).parent().children("img").attr("src");
         $.post(
           "/MyBlog/albumServlet",
           {"albumId":album_id,"imgPath":img_path,"operation":"deleteImage"},
           function(data){
        	   if(data.flag){
        		   location.href="/MyBlog/albumServlet?operation=album_describ&album_id="+album_id;
        	   }
           },
           "json"
         )
	})
}